<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>M2MJS Menu</title>

<link href="style/M2MJsDefault.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="M2MJS/M2MJSCommon/XBrowser.js"></script>
<script type="text/javascript" src="M2MJS/M2MJSCommon/Connection.js"></script>
<script type="text/javascript" src="M2MJS/M2MJSCommon/TemplateLoader.js"></script>

<script type="text/javascript" src="M2MJS/M2MJSMenu/Menu.js"></script>

<script type="text/javascript">
var templateLoader;

function log(msg){
	document.getElementById("log").value += msg + "\n";
	
}

function init(){
	templateLoader = new TemplateLoader("MenuTemplates/MenuTemplate-1.html");
	
// 	var adminMenuItem = new MenuItem(document.getElementById("adminMenu"), templateLoader.loadTemplate("adminMenuItems"), new MenuDirection().down);
// 	var userMenuItem = new MenuItem(document.getElementById("userMenu"), templateLoader.loadTemplate("userMenuItems"), new MenuDirection().down);
	
	
	var optionsMenuItem = new MenuItem(document.getElementById("optionsMenu"), templateLoader.loadTemplate("optionsMenuItems"), new MenuDirection().down);
	var printOptionsMenuItem = new MenuItem(templateLoader.loadTemplate("printOptionsMenu"), templateLoader.loadTemplate("printOptionsMenuItems"), new MenuDirection().left);
	
	optionsMenuItem.log = function(msg){
		log(msg);
	}
	

	printOptionsMenuItem.log = function(msg){
		log(msg);
	}
	
	var menuItems = new Array();
	menuItems.push(optionsMenuItem);
	menuItems.push(printOptionsMenuItem);

	var menu = new Menu(menuItems); 
	
}


window.onload = init;

</script>

</head>
<body>
  <div style="width:400px; height:25px; background-color:#dcdcdc; border:1px solid; position:absolute; top:10px; left:5px; cursor:default;">
    <div style="width:140px; height:25px; float:left; border:1px solid;" id="adminMenu">Administration</div>
    <div style="width:100px; height:25px; float:left; border:1px solid;" id="userMenu">User</div>
    <div style="width:100px; height:25px; float:left; border:1px solid;" id="optionsMenu">Options</div>
</div>



<br /><br /><br /><br /><br /><br /><br /><br />
<textarea rows="15" cols="40" id="log" style="position:absolute; top:170px; left:550px; "></textarea>  
</body>
</html>